using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.Authorization;
using Volo.Abp.Identity;
using AuthService.Localization;
using AuthService.Permissions;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;

namespace AuthService
{
    [DependsOn(
        typeof(AuthServiceDomainSharedModule),
        typeof(AbpIdentityApplicationContractsModule)
    )]
    public class AuthServiceApplicationContractsModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            Configure<AbpLocalizationOptions>(options =>
            {
                options.Resources
                    .Add<AuthServiceResource>("en");
            });

            // 配置权限 - 简化配置，避免版本兼容问题
            // 权限定义将在应用层配置

            // AutoMapper配置将在应用层处理
        }

        private static LocalizableString L(string name)
        {
            return LocalizableString.Create<AuthServiceResource>(name);
        }
    }
}
